package com.dianqiu.common.bean;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import com.dianqiu.base.bean.BaseTO;

/**
 * DqLeagues entity. @author David Dai
 */
@Entity
@Table(name = "dq_leagues", catalog = "dq_dev")
public class DqLeaguesTO extends BaseTO implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer lgId;
	private DqLeagueTypeTO dqLeagueType;
	private DqCountryTO dqCountry;
	private String lgName;
	private String lgNameEn;
	private String lgNameSc;
	private String lgNameTc;
	private Integer lgRank;
	private String lgLogo;
	private Integer lgRoundCnt;
	private Integer lgClubsCnt;
	private Integer lgPoints;
	private String lgDescription;
	private Set<DqMatchTO> dqMatchs = new HashSet<DqMatchTO>(0);
	private Set<DqMatchHistTO> dqMatchHists = new HashSet<DqMatchHistTO>(0);
	private Set<DqLeagueMatchesTO> dqLeagueMatcheses = new HashSet<DqLeagueMatchesTO>(
			0);
	private Set<DqLeagueClubsTO> dqLeagueClubses = new HashSet<DqLeagueClubsTO>(0);

	@Id
	@Column(name = "LG_ID", unique = true, nullable = false)
	public Integer getLgId() {
		return this.lgId;
	}

	public void setLgId(Integer lgId) {
		this.lgId = lgId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "LG_TYPE_ID")
	public DqLeagueTypeTO getDqLeagueType() {
		return this.dqLeagueType;
	}

	public void setDqLeagueType(DqLeagueTypeTO dqLeagueType) {
		this.dqLeagueType = dqLeagueType;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "COUNTRY_ID")
	public DqCountryTO getDqCountry() {
		return this.dqCountry;
	}

	public void setDqCountry(DqCountryTO dqCountry) {
		this.dqCountry = dqCountry;
	}

	@Column(name = "LG_NAME", length = 45)
	public String getLgName() {
		return this.lgName;
	}

	public void setLgName(String lgName) {
		this.lgName = lgName;
	}

	@Column(name = "LG_NAME_EN", nullable = false, length = 200)
	public String getLgNameEn() {
		return this.lgNameEn;
	}

	public void setLgNameEn(String lgNameEn) {
		this.lgNameEn = lgNameEn;
	}

	@Column(name = "LG_NAME_SC", nullable = false, length = 200)
	public String getLgNameSc() {
		return this.lgNameSc;
	}

	public void setLgNameSc(String lgNameSc) {
		this.lgNameSc = lgNameSc;
	}

	@Column(name = "LG_NAME_TC", length = 45)
	public String getLgNameTc() {
		return this.lgNameTc;
	}

	public void setLgNameTc(String lgNameTc) {
		this.lgNameTc = lgNameTc;
	}

	@Column(name = "LG_RANK", nullable = false)
	public Integer getLgRank() {
		return this.lgRank;
	}

	public void setLgRank(Integer lgRank) {
		this.lgRank = lgRank;
	}

	@Column(name = "LG_LOGO", length = 200)
	public String getLgLogo() {
		return this.lgLogo;
	}

	public void setLgLogo(String lgLogo) {
		this.lgLogo = lgLogo;
	}

	@Column(name = "LG_ROUND_CNT")
	public Integer getLgRoundCnt() {
		return this.lgRoundCnt;
	}

	public void setLgRoundCnt(Integer lgRoundCnt) {
		this.lgRoundCnt = lgRoundCnt;
	}

	@Column(name = "LG_CLUBS_CNT")
	public Integer getLgClubsCnt() {
		return this.lgClubsCnt;
	}

	public void setLgClubsCnt(Integer lgClubsCnt) {
		this.lgClubsCnt = lgClubsCnt;
	}

	@Column(name = "LG_POINTS")
	public Integer getLgPoints() {
		return this.lgPoints;
	}

	public void setLgPoints(Integer lgPoints) {
		this.lgPoints = lgPoints;
	}

	@Column(name = "LG_DESCRIPTION", length = 2000)
	public String getLgDescription() {
		return this.lgDescription;
	}

	public void setLgDescription(String lgDescription) {
		this.lgDescription = lgDescription;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqLeagues")
	public Set<DqMatchTO> getDqMatchs() {
		return this.dqMatchs;
	}

	public void setDqMatchs(Set<DqMatchTO> dqMatchs) {
		this.dqMatchs = dqMatchs;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqLeagues")
	public Set<DqMatchHistTO> getDqMatchHists() {
		return this.dqMatchHists;
	}

	public void setDqMatchHists(Set<DqMatchHistTO> dqMatchHists) {
		this.dqMatchHists = dqMatchHists;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqLeagues")
	public Set<DqLeagueMatchesTO> getDqLeagueMatcheses() {
		return this.dqLeagueMatcheses;
	}

	public void setDqLeagueMatcheses(Set<DqLeagueMatchesTO> dqLeagueMatcheses) {
		this.dqLeagueMatcheses = dqLeagueMatcheses;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dqLeagues")
	public Set<DqLeagueClubsTO> getDqLeagueClubses() {
		return this.dqLeagueClubses;
	}

	public void setDqLeagueClubses(Set<DqLeagueClubsTO> dqLeagueClubses) {
		this.dqLeagueClubses = dqLeagueClubses;
	}

}